function getServiceNumber() {
    const serviceNum = document.getElementById('serviceNum');
    const serviceNumber = document.getElementById('serviceNumber');
    const serviceNumber2 = document.getElementById('serviceNumber2');
    const serviceNumber3 = document.getElementById('serviceNumber3');
    const serviceNumber4 = document.getElementById('lookServer');
    $.ajax({
        type: 'GET',
        url: httpUrl + '/api/v1/open/sp',
        success: function (result) {
            if(result.code=='10000'){
                const decodedURIComponent = decodeURIComponent(result.data);
                const phone = atob(decodedURIComponent);
                if(serviceNum)serviceNum.innerText="客服: "+phone
                if(serviceNumber)serviceNumber.innerText=phone
                if(serviceNumber2)serviceNumber2.innerText=phone
                if(serviceNumber3)serviceNumber3.innerText=phone
                if(serviceNumber4)serviceNumber4.innerText=phone
            }
        },
        error: function (xhr, status, error) {
        }
    });
}
function displayTextBasedOnDomain() {
    const domain = window.location.hostname;
    const company = document.getElementById('company');
    const beiNum = document.getElementById('beiNum');
    $.ajax({
        type: 'GET',
        url: httpUrl + '/api/v1/open/icp',
        success: function (result) {
            if(result.code===10000){
                console.log(result);
                company.textContent = result.data.company;
                if(result.data.icp){
                    beiNum.textContent =result.data.icp
                }else{
                    if (domain.includes('uffiedo')) {
                        beiNum.textContent = '备案号: 辽ICP备2024045334号-1';
                    } else if (domain.includes('xinfysk')) {
                        beiNum.textContent = '备案号: 辽ICP备2024046332号-1';
                    } else if (domain.includes('sdftjhrh')) {
                        beiNum.textContent = '备案号: 辽ICP备2024045965号-1';
                    } else if (domain.includes('hdixxbtsl')) {
                        beiNum.textContent = '备案号: 苏ICP备2023015066号-1';
                    } else{
                        beiNum.textContent = '';
                    }
                }
            }
        },
        error: function (xhr, status, error) {
        }
    });
}
displayTextBasedOnDomain()
getServiceNumber()
